<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.6/iconfont.css" rel="stylesheet" type="text/css" />
<link href="lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />

<link href="css/bootstrap.css" rel="stylesheet">
<script src="js/jquery.js"></script> 
<script src="js/bootstrap.js"></script> 
<link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.css" rel="stylesheet" >
<script src="js/summernote.js"></script>
<title>发布赛事</title>
</head>
<body>
<div class="pd-20">
	<form action="<%=path%>/backstage/u_match-info-add" method="post" class="form form-horizontal" id="form-u_match-add">
		<input type="hidden" id="id" name="id" value='${u_match.match_id}' />
        <input type="hidden" id="match_id" name="match_id" value='${u_match.match_id}' />
         <input type="hidden" id="web_path" name="web_path" value='<%=path %>' />
        
         <div class="row cl">
			<label class="form-label col-2">赛事分类：</label>
            <div class="formControls col-2">
	            <select name="match_cate" 
					class="select-box">
					<c:forEach items="${match_cates_list}" var="cate">
						<option value="${cate.item_value}" 
							<c:if test="${u_match.match_cate==cate.item_value}">selected</c:if>>${cate.display_name}
						</option>					
					</c:forEach>
				</select>

        	</div>
		</div>
        <div class="row cl">
			<label class="form-label col-2">赛事名：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${u_match.match_name}" placeholder="" id="" name="match_name" datatype="*" nullmsg="不能为空">
        	</div>
		</div>

        <div class="row cl">
			<label class="form-label col-2">赛事介绍：</label>
           <%--  <div class="formControls col-2">
                <input type="text" class="input-text" value="${u_match.match_introduce}" placeholder="" id="" name="match_introduce" datatype="*" nullmsg="不能为空">
        	</div> --%>
        	<input type="hidden" id="match_introduce" name ="match_introduce" >
			<div class="formControls col-xs-8 col-sm-5">
		 		<div id="summernote" class="input-text">${u_match.match_introduce}</div>
		 	</div>
		</div> 
        <div class="row cl">
			<label class="form-label col-2">赛事规则介绍：</label>
            <div class="formControls col-2">
                 <textarea class="form-control" name="match_rules" datatype="*" nullmsg="不能为空">${u_match.match_rules}</textarea>
        	</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-2">赛事缩略图：</label>
            <div class="formControls col-2">
                <div id="fileList_pre" class="uploader-list"></div>
				<div id="filePicker_pre">选择图片</div>
				<input type="hidden" class="input-text"
				value="${u_match.thumbnail}" placeholder=""
				id="thumbnail" name="thumbnail">
				<c:if test="${u_match.thumbnail != ''}">
					<div>
						<img id= "show_thumb" src = "${u_match.thumbnail}" style="width:100px; height:100px"/>
					</div>
				</c:if>
        	</div>
		</div>
					
        <div class="row cl">
			<label class="form-label col-2">缩略图H5：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${u_match.thumbnail_h5}" placeholder="" id="" name="thumbnail_h5" datatype="*" nullmsg="不能为空">
        	</div>
		</div>
        <div class="row cl">
			<label class="form-label col-2">报名起止时间：</label>
            <div class="formControls col-2">
                <input type="text"  class="input-text Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" 
                	value="${u_match.pstart_time}" placeholder="" id="" name="pstart_time" datatype="*" nullmsg="不能为空">
        	</div>
		
			<label class="form-label col-2">至：</label>
            <div class="formControls col-2">
                <input type="text"  class="input-text Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"  
                	value="${u_match.pend_time}" placeholder="" id="" name="pend_time" datatype="*" nullmsg="不能为空">
        	</div>
		</div>
        <div class="row cl">
			<label class="form-label col-2">投票起止时间：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                	value="${u_match.vstart_time}" placeholder="" id="" name="vstart_time" datatype="*" nullmsg="不能为空">
        	</div>
		
			<label class="form-label col-2">至：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" 
                	value="${u_match.vend_time}" placeholder="" id="" name="vend_time" datatype="*" nullmsg="不能为空">
        	</div>
		</div>
        <div class="row cl">
			<label class="form-label col-2">结果公布时间：</label>
            <div class="formControls col-2">
                <input type="text"  class="input-text Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"  
                	value="${u_match.result_time}" placeholder="" id="" name="result_time" datatype="*" nullmsg="不能为空">
        	</div>
		</div>
 		<div class="row cl"></div>
		<div class="cl pd-5 bg-1 bk-gray"> 		
			<div class="btn btn-default btn-warning title rleft def" style="width:100%">奖项设定</div>			
		 </div>

	<div class="form form-horizontal">
        <div class="row cl">
			<label class="form-label col-2">奖金总额 ：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${u_match.bonus_amount}" placeholder="" id="" name="bonus_amount" datatype="*" nullmsg="不能为空">
        	</div>
		</div>
		 <div class="row cl">
			<label class="form-label col-2">平台收费 ：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${u_match.counter_fee}" placeholder="" id="" name="counter_fee" datatype="*" nullmsg="不能为空">
        	平台收取赛事总金额  10  ％
        	</div>
        
		</div> 
		     
        <div class="row cl">
			<label class="form-label col-2">获奖金额：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${u_match.win_amount}" placeholder="" id="" name="win_amount" datatype="*" nullmsg="不能为空">
        	</div>
		</div>
        <div class="row cl">
			<label class="form-label col-2">竞猜金额 ：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${u_match.guess_amount}" placeholder="" id="" name="guess_amount" datatype="*" nullmsg="不能为空">
        	</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">参赛名额 ：</label>
            <div class="formControls col-2">
                <input type="text" class="input-text" value="${u_match.join_count}" placeholder="" id="" name="join_count" datatype="*" nullmsg="不能为空">
        	</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-2">奖项设置 ：</label>
				   <div style="width:70%;margin-left: 10px" class="form-label col-2">		 
			<table
				class="table table-border table-bordered table-hover table-bg table-sort" id="charge">
				<thead>
					<tr class="text-c">
						<th style="width:15%">奖项等级</th>                        
                        <th style="width:15%">奖项名称</th>                            
						<th style="width:15%">获奖人数</th>                           
						<th style="width:15%">奖金比例</th>                      
						<th style="width:15%">奖金（元）</th>
						<th style="width:25%">其他</th>
						<th style="width:15%">操作</th>
					</tr>
				</thead>
				<tbody>
				<c:forEach items="${list_match_prize}" var="prize_info">
					<tr class="text-c">
							<td>
								<input type='text'
								class='input-text' 
								name='prize_num'  nullmsg='不能为空'
								value="${prize_info.prize_num}">
							</td>
							<td>
								<input type='text'
								class='input-text' 
								name='prize_name'  nullmsg='不能为空'
								value="${prize_info.prize_name}">
							</td>
								
							<td>
								<input type='text'
								class='input-text'  name='winner_count' datatype='n'
								value="${prize_info.winner_count}">
							</td>
								
							<td>
								<input type='text'
								class='input-text'  style='min-width: 10px'
								name='prize_percent' datatype='n1-100' nullmsg='不能为空并且必须是整数'
								value="${prize_info.prize_percent}">
							</td>
								
							<td >
								<input type="text"  name="prize_money" value="${prize_info.prize_money}" 
								class='input-text'  >	
							</td>	
							
							<td>
								<input type="text"  name="remark" value="${prize_info.remark}" 
								class='input-text' >	
							</td>
							<td>
								<button class='btn btn-warning radius' type='button' onClick="prize_disable(this)">
								<i class='fa fa-remove'>&#xe632;</i> 删除</button>
							</td>													
						</tr>
					</c:forEach>		
				</tbody>
			</table>
			</div>
		</div>
	    <div class="row cl">
			<button
				onClick="add_new_charge();" class="btn btn-success radius"
				type="button">
				<i class="Hui-iconfont">&#xe632;</i>添加奖项等级
			</button><label class="form-label col-xs-4 col-sm-3"></label>
		</div>
        <div class="row cl">
			<label class="form-label col-2">是否需要佐证视频：</label>
            <div class="formControls col-2">
              	<input type="radio" name="is_need_vedio" value="1" id="is_need_vedio"  <c:if test="${u_match.is_need_vedio==1}">checked</c:if> ><label>是</label>
				<input type="radio" name="is_need_vedio" value="2" id="is_need_vedio"  <c:if test="${u_match.is_need_vedio==2}">checked</c:if> ><label>否</label>
        	</div>
		</div>
  	</div>
        
		<div class="row cl">
			<div class="col-10 col-offset-2">
				<button onClick="u_match_save_submit();" class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
			</div>
		</div>
	</form>
</div>

<!-- <script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>  -->
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script> 
<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript" src="lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="lib/Validform/5.3.2/Validform.min.js"></script> 
<script type="text/javascript" src="lib/webuploader/0.1.5/webuploader.min.js"></script> 
<script type="text/javascript" src="lib/ueditor/1.4.3/ueditor.config.js"></script>
<script type="text/javascript" src="lib/ueditor/1.4.3/ueditor.all.min.js"> </script>
<script type="text/javascript" src="lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script>
<script type="text/javascript" src="js/u_match.js"></script> 
<script type="text/javascript">
$(document).ready(function(){
	$('#summernote').summernote({
		height: 150    
	});
});


function prize_disable(obj){
	$(obj).parent().parent().remove();
}
var web_path = "<%=path%>";
</script>
</body>
</html>

